package com.dhcc.DRGsHosp.web.controller;

import org.openkoala.security.shiro.CurrentUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.dhcc.DRGsHosp.facade.DoctorMonitorFacade;
/**
 * 
 * @title		:DoctorMonitorContorller.java
 * @description	:三级医师|主诊组 检测类
 * @author		:mazhaoyan
 * @date		:2016年8月15日
 * @version     :1.0
 * @copyright   :DHCC 2013-2014
 */
@Controller("drgsHospWebController12")
@RequestMapping("/doctorMonitor")
public class DoctorMonitorContorller {
	@Autowired
	private DoctorMonitorFacade doctorMonitorFacade;
	/**
	 * 
	 * @methodname    :getControlWard
	 * @description   : 获取当前用户所管辖的病区
	 * @param         :
	 * @author        :mazhaoyan
	 * @return        :
	 * @date          :2016年8月10日
	 */
	@ResponseBody
	@RequestMapping(value = "/getUserDepCode", method = RequestMethod.POST)
	public String getUserDepCode() {
		String userName = CurrentUser.getName();//角色名
		String depCode = doctorMonitorFacade.getUserDepCode(userName);
		
		return depCode;
		
		/*Map<String, Object> map = new HashMap<String, Object>();
		String roleName = CurrentUser.getRoleName();//角色名
		String wardCode = CurrentUser.getWardCode();//所辖病区代码
		String wardDesc = CurrentUser.getWardDesc();//所辖病区描述
		Map<String, Object> tmpmap = wardMonitorFacade.getDepInfo(wardCode);
		map.put("roleName", roleName);
		map.put("wardCode", wardCode);
		map.put("wardDesc", wardDesc);
		map.put("depCode",tmpmap.get("depCode"));
		map.put("depName",tmpmap.get("depName"));
		map.put("depGroupCode",tmpmap.get("depGroupCode"));
		map.put("depGroupName",tmpmap.get("depGroupName"));
		return map;*/
	}
}
